<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ include file="a.header.jsp" %>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head> 
 <body>
 <form class="layui-form" action="">
 	<button type="button" class="layui-btn" id="t">选择牵头单位</button>
  <div class="layui-form-item layui-form-text">
    <label class="layui-form-label">文本域</label>
    <div class="layui-input-block">
      <textarea name="desc" placeholder="请输入内容" class="layui-textarea" id="text"></textarea>
    </div>
  </div>
  <div class="layui-form-item">
    <div class="layui-input-block">
      <button class="layui-btn" lay-submit lay-filter="formDemo">立即提交</button>
      <button type="reset" class="layui-btn layui-btn-primary">重置</button>
    </div>
  </div>
  </form>
<!-- /layuiproject/WebContent/4弹出层/a1获取弹出层的值.jsp -->
<script>
//Demo
layui.use('form', function(){
  var form = layui.form;
  $=layui.$;
  $('#t').click(function(){
	  layer.open({
          type: 2,
          area: ['500px', '700px'],
          title: "更改信息",
          fixed: false, //不固定
          maxmin: true,
          maxmin: false,
          shadeClose:false,
          content: 'tabs.jsp',
          success: function(layero, index){
          	console.log(layero.context, index);
          	var iframeWindow = window['layui-layer-iframe'+ index]  //获取iframe窗口          	 
          }    
        });
  })
  //监听提交
  form.on('submit(formDemo)', function(data){
	console.log(data.field)
    layer.msg(JSON.stringify(data.field));
    return false;
  });
});
</script>
</body>

</html>